package cn.wolfcode.wolf2w.repository;


//import cn.wolfcode.wolf2w.domain.Strategy;
import cn.wolfcode.wolf2w.domain.Strategy;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

/**
* 攻略持久层接口
*/
public interface StrategyRepository extends MongoRepository<Strategy, String>{
    /**
     * 根据关联的分类id查询攻略对象
     * @param cid
     * @return
     */
    List<Strategy> findByCatalogId(String cid);

    /**
     * 根据目的地id查询攻略集合对象
     * @param destId
     * @param pageable
     * @return
     */
    List<Strategy> findByDestId(String destId, Pageable pageable);

    List<Strategy> queryByDestName(String destName);
}
